package com.ck.core.constant;

/**
 * @author linqiang
 * @Description 系统字典类型枚举类
 * @date 2019-05-05 11:04
 */
public enum DictionaryTypeEnum {

    PROGRAM_STATUS("节目状态", "program_status"),
    PROGRAM_ORIGIN("节目来源", "program_origin"),

    PROGRAM_PUTIN_LEVEL("投放级别", "program_putin_level"),
    DEVICE_TYPE("终端类型", "device_type"),
    DEVICE_RESOLUTION("分辨率", "device_resolution"),
    PROGRAM_PUTIN_LIMIT("投放限制", "program_putin_limit"),;

    /**
     * 配置描述信息
     */
    private String desc;
    /**
     * 配置项
     */
    private String type;

    DictionaryTypeEnum(String desc, String type) {
        this.desc = desc;
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static DictionaryTypeEnum getByType(String type) {
        for (DictionaryTypeEnum sysConfigNameEnum : DictionaryTypeEnum.values()) {
            if (sysConfigNameEnum.getType().equals(type)) {
                return sysConfigNameEnum;
            }
        }
        return null;
    }

}
